}
talloc_free(domain->conn);
+
+ fire_watches(NULL, "@releaseDomain", false);
+
send_ack(conn, XS_RELEASE);
}
{
xc_dominfo_t dominfo;
struct domain *domain, *tmp;
+ int released = 0;
list_for_each_entry_safe(domain, tmp, &domains, list) {
if (xc_domain_getinfo(*xc_handle, domain->domid, 1,
!dominfo.dying && !dominfo.crashed && !dominfo.shutdown)
continue;
talloc_free(domain->conn);
+ released++;
}
+
+ if (released)
+ fire_watches(NULL, "@releaseDomain", false);
}
void do_get_domain_path(struct connection *conn, const char *domid_str)
struct watch *watch;
/* During transactions, don't fire watches. */
- if (conn->transaction)
+ if (conn && conn->transaction)
return;
/* Create an event for each watch. Don't send to self. */